home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-05-14 | 789 b | 29 lines | [DMN1/DMAN] |
- % Alphabetizes entries in Window 1 into a new, untitled document in Window 2
- % Assumes text being alphabetized does not begin with the ASCII 255 character.
- p b2
- % STEP 1: Make temporary entry in Window 2 so Find will always find an alphabetically higher line.
- w ˇ^p
- p 1 What file do you wish to alphabetize?
- % STEP 2: Look for each line in the original.
- s o ^1-2000[!^p]
- % STEP 3: Switch to new window, go to top of document.
- p 2
- m gou1
- % STEP 4: Look for first line alphabetically greater than copied string.
- s con ^1-2000[!^p]>"^&"
- b
- % STEP 5: Move to beginning of that line.
- m gol1
- % STEP 6: Write copied string and a carriage return.
- w ^&^p
- p 1
- b
- % STEP 7: Get rid of that temporary entry.
- p 2
- m god1
- s nr ˇ^p
- c b
- b
- b
-